package com.example.shopping.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.shopping.dao.GoodsDao;
import com.example.shopping.pojo.domain.GoodsBean;
import com.example.shopping.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Dream
 * @version 1.0
 * @date 2020/11/9 12:08
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsDao,GoodsBean> implements GoodsService {
    @Autowired
    private GoodsDao goodsDao;

    @Override
    public List<GoodsBean> getAll(String value) {
        return goodsDao.getAll(value);
    }

    @Override
    public void addGoods(GoodsBean goodsBean) {
        goodsDao.addGoods(goodsBean);
    }

    @Override
    public GoodsBean getById(Integer goodsId) {
        return goodsDao.getById(goodsId);
    }

    @Override
    public void updateGoods(GoodsBean goodsBean) {
        goodsDao.updateGoods(goodsBean);
    }
}
